RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
RUN:   | llvm-dwarfdump -find=not_there_at_all - | \
RUN: FileCheck %s --check-prefix=EMPTY --allow-empty
EMPTY: {{^$}}

RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
RUN:   | llvm-dwarfdump -find=main - | FileCheck %s
CHECK: : DW_TAG_subprogram
CHECK-NOT: {{:}}
CHECK:     DW_AT_name ("main")
CHECK-NOT: {{:}}

RUN: llvm-dwarfdump %S/../../dsymutil/Inputs/libfat-test.a \
RUN:   -find=x86_64h_var -find=i386_var \
RUN:   | FileCheck %s --check-prefix=MULTI
MULTI: libfat-test.a(i386)
MULTI-NOT: {{: DW}}
MULTI: : DW_TAG_variable
MULTI-NOT: {{: DW}}
MULTI:    DW_AT_name ("i386_var")
MULTI: libfat-test.a(x86_64h)
MULTI-NOT: {{: DW}}
MULTI: : DW_TAG_variable
MULTI-NOT: {{: DW}}
MULTI:    DW_AT_name ("x86_64h_var")
MULTI-NOT: {{: DW}}

RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
RUN:   | llvm-dwarfdump -find=int - | FileCheck %s --check-prefix=TYPES
TYPES: : DW_TAG_base_type
TYPES-NOT: {{:}}
TYPES:     DW_AT_name ("int")
TYPES-NOT: {{:}}

RUN: llvm-dwarfdump %S/../../dsymutil/Inputs/odr-anon-namespace/1.o \
RUN:    -find="(anonymous namespace)" \
RUN:   | FileCheck %s --check-prefix=NAMESPACE
NAMESPACE-NOT: {{: DW}}
NAMESPACE: 0x0000005b: DW_TAG_namespace
NAMESPACE-NOT: {{: DW}}
